import { http } from "../http";

const baseUrl = "/api/dms/approval-flow";

// 审批人员查询需要自己审批的设备申请流程(需要支持根据审批状态查询)
export interface DetailsRequestType {
  approverUserCode: string;
  processType: string;
  page: number;
  size: number;
}
export const detailsAPI = (params: DetailsRequestType) => {
  return http.post(`${baseUrl}/details`, params);
};

// 审批
export interface SubmitRequestType {
  approverUserCode: string;
  approvalRecordId: string;
  flowId: string;
  result: string;
  comment: string;
}
export const submitAPI = (params: SubmitRequestType) => {
  return http.post(`${baseUrl}/submit`, params);
};
